package com.ititer.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.ititer.dao.IpsDao;
import com.ititer.mapper.IpsMapper;
import com.ititer.model.Ips;
import com.ititer.model.IpsCriteria;
import com.ititer.util.MyBatisCriteriaFactory;

@Repository
public class IpsDaoImpl implements IpsDao {
	@Autowired
	private IpsMapper ipsMapper;

	@Override
	public List<Ips> getIps(long ipValue) {
		IpsCriteria ipexample = MyBatisCriteriaFactory.newCriteria(IpsCriteria.class);
		ipexample.createCriteria().andStartLessThanOrEqualTo(ipValue).andEndGreaterThanOrEqualTo(ipValue);
		return ipsMapper.selectByExample(ipexample);
	}

}
